net = require "net"
moment = require "moment"

port = 8000
format_ = "YYYY-MM-DD HH:mm"

server = net.createServer (socket) ->
  current_time = moment().format(format_)
  socket.write(current_time + "\n")
  socket.end()

server.listen port
